# -*- coding:utf-8 -*-

# @File     :project
# @Author   :Yupeng
# @Date     :2019/2/26 15:22
'''
用于图像识别的项目，基本是参照IBM来做，项目下面包括项目资源（图片压缩包或文件夹）、项目训练好的模型、项目测试结果
'''

from django.db import models
from django.utils import timezone

from apps.accounts.models import User

#
# class Project(models.Model):
#     '''
#
#     '''
#     title = models.CharField(max_length=50, default='Default title')
#     author = models.ForeignKey(User, on_delete=models.CASCADE, related_name='user')
#     created_time = models.DateTimeField(auto_now_add=True)
#     description = models.CharField(max_length=254, null=True)
#
#     class Meta:
#         ordering = ('-created_time',)
#
#     def to_dict(self):
#         '''
#         返回字段dict
#         :return:
#         '''
#         d = {
#             'id': self.id,
#             'title': self.title,
#             'author': self.author,
#             'created_time': self.created_time,
#             'description': self.description
#         }
#         return d
